<template>
  <div v-for="p in accountData" :key="p.title" class="account">
    <div class="account-title">{{ p.title }}</div>
    <div class="account-main">
      <div class="money">
        <p>账户金额</p>
        <p>{{ p.accountMoney }}</p>
      </div>
      <div class="money">
        <p>应收账款</p>
        <p>{{ p.collectMoney }}</p>
      </div>
      <div class="money fontColor">
        <p>应付账款</p>
        <p>{{ p.payMoney }}</p>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { reactive } from 'vue';

const accountData = reactive([
  {
    title: '返利账户详情(实时)',
    accountMoney: 129999.0,
    collectMoney: 13999999.0,
    payMoney: 119000.0,
  },
  {
    title: '现金账户详情(实时)',
    accountMoney: 129999.0,
    collectMoney: 13999999.0,
    payMoney: 119000.0,
  },
  {
    title: '售后账户详情(实时)',
    accountMoney: 129999.0,
    collectMoney: 13999999.0,
    payMoney: 119000.0,
  },
]);
</script>

<style scoped lang="scss">
.account {
  flex: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 10px 10px;
  .account-title {
    height: 30px;
    line-height: 30px;
  }
  .account-main {
    flex: 1;
    box-sizing: border-box;
    display: flex;
    .money {
      flex: 1;
      p {
        line-height: 20px;
      }
      :nth-child(1) {
        font-size: 14px;
      }
      :nth-child(2) {
        font-size: 12px;
      }
    }
    .fontColor {
      :nth-child(2) {
        color: orange;
      }
    }
  }
}
</style>
